ignore Android binding warnings #4423
Merged
jamescrosswell merged 5 commits intomainfrom Aug 15, 2025
Merged
Conversation
…warnings - Enable TreatWarningsAsErrors for Android bindings project - Suppress expected/unavoidable Android binding warnings (BG8xxx codes) - These warnings are caused by Java interface circular dependencies in Sentry SDK - Warnings are documented with explanations for each type - New warning types will now break the build for review - Analyzed 1528 warnings and confirmed they're due to binding limitations - Solution preserves existing Metadata.xml strategic type removals
Flash0ver
reviewed
Aug 11, 2025
| <!-- BG8604: Missing ancestor types - nested types whose parents are removed --> | ||
| <!-- BG8502: Interface invalidation - cascade effect from other binding issues --> | ||
| <!-- BG8401/BG8400: Field/property conflicts - resolved individually in Metadata.xml where needed --> | ||
| <NoWarn>$(NoWarn);BG8801;BG8C01;BG8701;BG8800;BG8700;BG8605;BG8606;BG8604;BG8502;BG8401;BG8400;BG8503;BG8C00</NoWarn> |
Member
There was a problem hiding this comment.
suggestion: also mention BG8503 and BG8C00 in the comments
Member
Author
There was a problem hiding this comment.
What should I add as a comment?
Unless there's a plan to fix them, I just want all warnings gone. Should we leave the warnings on the terminal?
Doesn't seem like any of this is worth doing anything about since we're not binding the whole library and it works as inteded
Member
There was a problem hiding this comment.
I was thinking about a short description of these warning for completeness.
I added (non-blocking) suggestions.
Flash0ver
reviewed
Aug 12, 2025
| <!-- BG8801: Invalid parameter types - caused by circular interface dependencies in Sentry Java SDK --> | ||
| <!-- BG8C01: Invalid base interface - interfaces reference types removed by Metadata.xml --> | ||
| <!-- BG8701: Invalid return types - return types reference unresolvable interfaces --> | ||
| <!-- BG8800/BG8700: Unknown/Invalid types - types intentionally removed by Metadata.xml --> |
Member
There was a problem hiding this comment.
Suggested change
| <!-- BG8800/BG8700: Unknown/Invalid types - types intentionally removed by Metadata.xml --> | |
| <!-- BG8800/BG8700: Unknown parameter/return types - types intentionally removed by Metadata.xml --> |
Invalid parameter/return types are BG8801/BG8701.
Flash0ver
reviewed
Aug 12, 2025
Flash0ver
reviewed
Aug 12, 2025
Flash0ver
approved these changes
Aug 12, 2025
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building now creates lots of warnings.
Even though the solution had TreatWarningAsErrors, the build passes, which means these warnings are not 'normal' and sneak in and grow over time.
I'm ignoring all warnings that we can't take action (trusting Cursor pretty much on those claims).
But after a few iterations, I couldn't get these types of warnings to break the build, so if new ones are introduced, it'll take someone paying attention and ignoring them explicitly.
Before:
Cursors claims:
Turns out there's not much we can do about these, so we'll ignore them
Enable TreatWarningsAsErrors for Android bindings projectrevertedNew warning types will now break the build for reviewnot true#skip-changelog